<script setup lang="ts">
const {waterForm} = defineProps<{
  waterForm: Object;  // 定义采样时间的类型
}>();
</script>

<template>
  <el-card class="box-card">
    <h1 style="text-align: center">环境空气和废气 颗粒物分析原始记录（B面）</h1>
    <div>SXLPHJ/JL/CX-22-79</div>
    <table class="table">
      <tr>
        <td style="width: 10%;font-weight: bold;text-align: center;" colspan="19">天平校准</td>
      </tr>
      <tr>
        <td style="width: 11%;" colspan="2">砝码规格</td>
        <td style="width: 11%;" colspan="2">砝码编号</td>
        <td style="width: 11%;" colspan="3">第一次称量(g)</td>
        <td style="width: 11%;" colspan="3">第二次称量(g)</td>
        <td style="width: 11%;" colspan="3">第三次称量(g)</td>
        <td style="width: 12%;" colspan="3">质控要求</td>
        <td style="width: 8%;" colspan="3">是否合格</td>
      </tr>
      <tr v-for="(item,index) in waterForm.bdatas.tpjz" :key="index">
        <td style="width: 11%;" colspan="2">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="item.fmgg"/>
        </td>
        <td style="width: 11%;" colspan="2">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="item.fmzl"/>
        </td>
        <td style="width: 11%;" colspan="3">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="item.dyccz"/>
        </td>
        <td style="width: 11%;" colspan="3">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="item.deccz"/>
        </td>
        <td style="width: 11%;" colspan="3">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="item.dsccz"/>
        </td>
        <td style="width: 12%;" colspan="3">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="item.zkyq"/>
        </td>
        <td style="width: 8%;" colspan="3">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="item.sfhg"/>
        </td>
      </tr>
      <tr>
        <td style="width: 10%;font-weight: bold;text-align: center;" colspan="19">标准滤膜检查</td>
      </tr>
      <tr>
        <td style="width: 10%;" colspan="2">标准滤膜编号</td>
        <td style="width: 10%;" colspan="2">滤头编号</td>
        <td style="width: 10%;" colspan="2">原始质量(g)</td>
        <td style="width: 10%;" colspan="2">称重1(g)</td>
        <td style="width: 10%;" colspan="2">称重2(g)</td>
        <td style="width: 10%;" colspan="2">称重3(g)</td>
        <td style="width: 10%;" colspan="2">平均值(g)</td>
        <td style="width: 10%;" colspan="2">与原始质量差值(mg)</td>
        <td style="width: 10%;" colspan="2">允许差值(mg)</td>
        <td style="width: 10%;" colspan="2">是否合格</td>
      </tr>
      <tr v-for="(item,index) in waterForm.bdatas.bzlmjc" :key="index">
        <td style="width: 10%;" colspan="2">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="item.bzlmbh"/>
        </td>
        <td style="width: 10%;" colspan="2">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="item.ltbh"/>
        </td>
        <td style="width: 10%;" colspan="2">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="item.yszl"/>
        </td>
        <td style="width: 10%;" colspan="2">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="item.cz1"/>
        </td>
        <td style="width: 10%;" colspan="2">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="item.cz2"/>
        </td>
        <td style="width: 10%;" colspan="2">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="item.cz3"/>
        </td>
        <td style="width: 10%;" colspan="2">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="item.pjz"/>
        </td>
        <td style="width: 10%;" colspan="2">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="item.yszlcz"/>
        </td>
        <td style="width: 10%;" colspan="2">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="item.yxcz"/>
        </td>
        <td style="width: 10%;" colspan="2">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="item.sfhg"/>
        </td>
      </tr>
      <tr>
        <td style="width: 10%;font-weight: bold;text-align: center;" colspan="19">空白检查</td>
      </tr>
      <tr>
        <td style="width: 10%;" colspan="2">空白样编号</td>
        <td style="width: 10%;" colspan="2">空白增重(g)</td>
        <td style="width: 10%;" colspan="2">系列平均体积(L)</td>
        <td style="width: 10%;" colspan="2">浓度ρnd (mg/m3)</td>
        <td style="width: 10%;" colspan="4">系列样品浓度判定</td>
        <td style="width: 10%;" colspan="2">排放限值(mg/m3)</td>
        <td style="width: 10%;" colspan="2">质控要求</td>
        <td style="width: 10%;" colspan="3">是否合格</td>
      </tr>
      <tr v-for="(item,index) in waterForm.kbycd" :key="index">
        <td style="width: 10%;" colspan="2">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="item.kbybh"/>
        </td>
        <td style="width: 10%;" colspan="2">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="item.kbzz"/>
        </td>
        <td style="width: 10%;" colspan="2">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="item.xlpjtj"/>
        </td>
        <td style="width: 10%;" colspan="2">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="item.nd"/>
        </td>
        <td style="width: 10%;" colspan="4">
          <el-radio-group v-model="item.xlypndpd">
            <el-radio value="1">＜1.0mg/m³</el-radio>
            <el-radio value="2">≥1.0mg/m³</el-radio>
          </el-radio-group>
        </td>
        <td style="width: 10%;" colspan="2">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="item.pfxz"/>
        </td>
        <td style="width: 10%;" colspan="2">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="item.zkyq"/>
        </td>
        <td style="width: 10%;" colspan="3">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="item.sfhg"/>
        </td>
      </tr>
      <tr>
        <td style="width: 10%;font-weight: bold;text-align: center;" colspan="19">平行双样检查</td>
      </tr>
      <tr>
        <td style="width: 10%;" colspan="4">同步双样编号</td>
        <td style="width: 10%;" colspan="4">测定浓度ρnd (mg/m³)</td>
        <td style="width: 10%;" colspan="4">相对偏差(%)</td>
        <td style="width: 10%;" colspan="4">允许偏差(%)</td>
        <td style="width: 10%;" colspan="3">是否合格</td>
      </tr>
      <tr v-for="(item, index) in waterForm.pxycd" :key="index">
        <!-- 判断如果是偶数行才合并列 -->
        <td style="width: 10%;" colspan="4">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入" v-model="item.tbsybh"/>
        </td>

        <!-- 如果是单数行，合并rowspan -->
        <td v-if="index % 2 === 0" style="width: 10%;" colspan="4" rowspan="2">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入" v-model="item.cdnd"/>
        </td>

        <td v-if="index % 2 === 0" style="width: 10%;" colspan="4" rowspan="2">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入" v-model="item.xdpc"/>
        </td>

        <td v-if="index % 2 === 0" style="width: 10%;" colspan="4" rowspan="2">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入" v-model="item.yxpc"/>
        </td>

        <td v-if="index % 2 === 0" style="width: 10%;" colspan="3" rowspan="2">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入" v-model="item.sfhg"/>
        </td>
      </tr>
      <tr>
        <td style="width: 10%;" colspan="4">备注</td>
        <td colspan="15">
          <el-input style="width: 100%;border: 1px solid transparent" placeholder="请输入"
                    v-model="waterForm.bdatas.bnotes"/>
        </td>
      </tr>
    </table>
  </el-card>
</template>

<style scoped lang="scss">
.card {
  padding: 20px 25px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  /* 表格边框合并 */
  text-align: left;
  /* 默认左对齐 */
  font-size: 14px;
  /* 字体大小 */
  color: #606266;
  /* 默认字体颜色 */
  margin-bottom: 20px;
}

.table th,
.table td {
  border: 1px solid #c2bfbf;
  /* 表格单元格边框颜色 */
  padding: 12px;
  /* 单元格内边距 */
}

.table th {
  background: #f5f7fa;
  /* 表头背景色 */
  font-weight: 600;
  /* 表头字体加粗 */
  color: #303133;
  /* 表头字体颜色 */
  text-align: center;
  /* 表头居中 */
}

.table td {
  width: 15%;
}

.table-td {
  display: flex;
}

::v-deep .el-input__wrapper {
  background-color: transparent;
  box-shadow: none;
}

::v-deep .el-select__wrapper {
  background-color: transparent;
  box-shadow: none;
}

::v-deep .el-input-group__append {
  background-color: transparent;
  box-shadow: none;
}
</style>

